/*
Matthew Grace	
Proposal title: Factors Affecting Public Opinion on Transgender Medical Care Refusal


HYPOTHESES

Stated-Hyp1: "We examine how views about medical care refusal vary by (1) patient’s gender identity (transman, transwoman)" (p. 1)

	Test-Hyp1: There will be difference in rates of belief that refusal should be allowed for patients who are transwomen vs. transmen
	
	Test-Hyp2: There will be difference in rates of trust in doctor's reason for refusing patients who are transwomen vs. transmen	

	Test-Hyp3: There will be difference in rates of belief that refusal should be allowed for patients who are transwomen vs. transmen if referral is provided	
	
Stated-Hyp2: "We examine how views about medical care refusal vary by ...(2) patient’s race (black, white, Latinx, Asian)" (p.1)
	- NOTE: discussion on p.3-4 suggests that the comparison group for each racial category is white.

	Test-Hyp4: There will be difference in rates of belief that refusal should be allowed for patients who are black vs. white
	
	Test-Hyp5: There will be difference in rates of trust in doctor's reason for refusing patients who are black vs. white

	Test-Hyp6: There will be difference in rates of belief that refusal should be allowed for patients who are black vs. white if referral is provided	

	Test-Hyp7: There will be difference in rates of belief that refusal should be allowed for patients who are latinx vs. white
	
	Test-Hyp8: There will be difference in rates of trust in doctor's reason for refusing patients who are latinx vs. white

	Test-Hyp9: There will be difference in rates of belief that refusal should be allowed for patients who are latinx vs. white if referral is provided		

	Test-Hyp10: There will be difference in rates of belief that refusal should be allowed for patients who are asian vs. white
	
	Test-Hyp11: There will be difference in rates of trust in doctor's reason for refusing patients who are asian vs. white

	Test-Hyp12: There will be difference in rates of belief that refusal should be allowed for patients who are asian vs. white if referral is provided		
		
Stated-Hyp3: "We examine how views about medical care refusal vary by ... (3) the justification provided by physicians for refusing treatment (inadequate training or religious objections)." (p 1)

	Test-Hyp13: Difference in rates of rates of belief that refusal should be allowed will vary in case of inadequate reason justification vs. religious objections.

	Test-Hyp14: Difference in rates of trust in doctor's reason for refusing patients will vary in case of inadequate reason justification vs. religious objections.
		
	Test-Hyp15: Difference in rates of rates of belief that refusal should be allowed will vary in case of inadequate reason justification vs. religious objections if a referral is provided

	
********************************************************************************
NOTES
- Experiment is blocked by whether folks work in medical field. but there is 
no hypothesis about professional background. So this a phantom stratification
(p.4)

- One set of outcomes pertains to frequency of contact with sexual minorities. 
There is no explanation of how this relates to the hypotheses. 
*/

clear all
use "Grace1119.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

	tab P_EXP
	
	* gender
	recode P_EXP (1/8=1) (9/16=0), gen(transwoman)
	tab transwoman
	
	* race
	recode P_EXP (2=0) (6=0) (10=0) (14=0) (*=.), gen(white)
	recode P_EXP (1=1) (5=1) (9=1) (13=1) (*=.), gen(black)
	recode P_EXP (3=1) (7=1) (11=1) (15=1) (*=.), gen(latinx)
	recode P_EXP (4=1) (8=1) (12=1) (16=1) (*=.), gen(asian)
				
	replace black=0 if white==0
	replace latinx=0 if white==0	
	replace asian=0 if white==0
	
	tab black
	tab latinx
	tab asian
	
	* justification provided by physicians for refusing treatment
	lab def just 1 "1 inadequate training" 2 "2 religion"
	recode P_EXP (1/4=1) (5/8=2) (9/12=1) (13/16=2), gen(justification)
	lab val justification just
	tab justification
	
* OUTCOME MEASURES

/*
Q1	To what extent do you agree or disagree that Dr. Smith should be [allowed to refuse/required] to treat [DOV_NAME]?
	
Q3	To what extent do you agree that [inadequate training/religious objection] is the primary reason why Dr. Smith will not treat [DOV_NAME]?

Q5	Suppose that Dr. Smith offered to refer [DOV_NAME] to another provider...To what extent do you agree or disagree that Dr. Smith should be [allowed to refuse/required] to treat [DOV_NAME].
 
*/
 	
	* should be allowed refusal
	tab Q1 
	replace Q1=. if Q1>4
	clonevar allowrefusal= Q1
	tab allowrefusal
	
	* trust in justification
	tab Q3
	replace Q3=. if Q3>4
	clonevar trust= Q3
	tab trust
	
	* allow refusal if referral provided
	tab Q5
	replace Q5=. if Q5>4
	clonevar allowrefusal_refer= Q5
	tab allowrefusal_refer
	
********************************************************************************

* ANALYSIS
	
*Test-Hyp1: There will be difference in rates of belief that refusal should be allowed for patients who are transwomen vs. transmen
	reg allowrefusal i.transwoman
	// reject. 0.926
	tess 1.transwoman, init(Grace1119) bonf(3)	
	
*Test-Hyp2: There will be difference in rates of trust in doctor's reason for refusing patients who are transwomen vs. transmen	
	reg trust i.transwoman
	// reject. 0.277

	tess 1.transwoman,	bonf(3)	
	
*Test-Hyp3: There will be difference in rates of belief that refusal should be allowed for patients who are transwomen vs. transmen if referral is provided	
	reg allowrefusal_refer i.transwoman
	// reject. 0.624
	tess 1.transwoman, bonf(3)	


*Test-Hyp4: There will be difference in rates of belief that refusal should be allowed for patients who are black vs. white
	reg allowrefusal i.black
	// reject. 0.274
	tess 1.black, bonf(3)	
	
	
*Test-Hyp5: There will be difference in rates of trust in doctor's reason for refusing patients who are black vs. white
	reg trust i.black
	// reject. 0.974
	tess 1.black, bonf(3)	
	
*Test-Hyp6: There will be difference in rates of belief that refusal should be allowed for patients who are black vs. white if referral is provided	
	reg allowrefusal_refer i.black
	// reject. 0.777
	tess 1.black, bonf(3)		
	
*Test-Hyp7: There will be difference in rates of belief that refusal should be allowed for patients who are latinx vs. white
	reg allowrefusal i.latinx
	// reject. 0.977
	tess 1.latinx, bonf(3)		
	
*Test-Hyp8: There will be difference in rates of trust in doctor's reason for refusing patients who are latinx vs. white
	reg trust i.latinx
	// reject. 0.097
	tess 1.latinx, bonf(3)	
	
*Test-Hyp9: There will be difference in rates of belief that refusal should be allowed for patients who are latinx vs. white if referral is provided		
	reg allowrefusal_refer i.latinx
	// reject. 0.510
	tess 1.latinx, bonf(3)	
	
*Test-Hyp10: There will be difference in rates of belief that refusal should be allowed for patients who are asian vs. white
	reg allowrefusal i.asian
	// reject. 0.932
	tess 1.asian, bonf(3)	
	
*Test-Hyp11: There will be difference in rates of trust in doctor's reason for refusing patients who are asian vs. white
	reg trust i.asian
	// reject. 0.851
	tess 1.asian, bonf(3)	
	
*Test-Hyp12: There will be difference in rates of belief that refusal should be allowed for patients who are asian vs. white if referral is provided		
	reg allowrefusal_refer i.asian
	// reject. 0.941	
	tess 1.asian, bonf(3)	
	
*Test-Hyp13: Difference in rates of rates of belief that refusal should be allowed will vary in case of inadequate reason justification vs. religious objections.
	reg allowrefusal i.justification
	// do not reject. 0.000
	tess 2.justification, bonf(3)	
	
*Test-Hyp14: Difference in rates of trust in doctor's reason for refusing patients will vary in case of inadequate reason justification vs. religious objections.
	reg trust i.justification
	// do not reject. 0.000
	tess 2.justification, bonf(3)	
	
*Test-Hyp15: Difference in rates of rates of belief that refusal should be allowed will vary in case of inadequate reason justification vs. religious objections if a referral is provided
	reg allowrefusal_refer i.justification
	// do not reject. 0.006
	tess 2.justification, bonf(3)		
	
